﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialInQCReport.aspx.cs" Inherits="MLY.Reports.DataReports.MaterialInQCReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> 

<%@ Register Assembly="DevExpress.Web.v11.1.Linq, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel"
  TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
  TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$ Dict:Report.MaterialInQC %>"></asp:Literal></title>
    
    <link href="/Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />
   
    <script src="../../TableSorter/jquery-latest.js" type="text/javascript"></script>
    <script src="../../TableSorter/jquery.tablesorter.js" type="text/javascript"></script>  
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
        <asp:Label ID="ReportTitleLabel" runat="server" Text="<%$ Dict:Report.MaterialInQC %>" CssClass="TitleStyle floater"></asp:Label>
        <br /><br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="ExportToXLS" />
            <asp:PostBackTrigger ControlID="ExportToXLSx" />          
        </Triggers>
        <ContentTemplate>
            <asp:Label ID="DateTypeTitle" runat="server" Text='<%$Dict:advancedRptPrams.chooseDateFilter: %>' CssClass="regFont"></asp:Label>
            &nbsp;&nbsp;
            <asp:DropDownList ID="DatesTypeDDL" runat="server" OnSelectedIndexChanged="RecreateReport" AutoPostBack="true">
                <asp:ListItem Text='<%$ Dict:clientAddWo.DateFieldA %>' Value="1"></asp:ListItem>
                <asp:ListItem Text='<%$ Dict:clientAddWo.DateFieldB %>' Value="2"></asp:ListItem>
            </asp:DropDownList>
            
            <br /><br />
            <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ReportGrid"></dx:ASPxGridViewExporter>
            <table cellpadding="5" cellspacing="0">
                <tr>
                <td>
                    <dx:ASPxButton Id="ExportToXLS" runat="server" Text="Export to XLS" UseSubmitBehavior="False"
                        OnClick="btnXlsExport_Click"   ></dx:ASPxButton>
                                      
                </td>
                <td>
                    <dx:ASPxButton Id="ExportToXLSx" runat="server" Text="Export to XLSx" UseSubmitBehavior="False"
                        OnClick="btnXlsxExport_Click"></dx:ASPxButton>
                </td>                
                </tr>
            </table>     
            <br /><br />
            <dx:ASPxGridView ID="ReportGrid" runat="server"  
             DataSourceID="MaterialInQCDataSource"
             EnableCallBacks="False" SettingsPager-RenderMode="Lightweight"
             EnableTheming="False" 
             KeyFieldName="CustomerWorkOrderNumber" 
             Settings-ShowFilterRow="true" 
             Settings-ShowGroupButtons="true"
             Settings-ShowFilterBar="Hidden" Settings-ShowFilterRowMenu="True"
             Settings-ShowGroupedColumns="True" Settings-ShowGroupPanel="True" 
             Settings-UseFixedTableLayout="True" >
            <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="NextColumn" AutoFilterRowInputDelay="2500"  />
            <SettingsPager RenderMode="Lightweight"></SettingsPager>
            <Styles Header-Wrap="True"></Styles>
            <Columns>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:ClientsGrid.ClientName %>" FieldName="CustomerOrganizationName"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:EditMessage.ContractorNames %>" FieldName="ContractorOrganizationName"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:ClienteditWoForm.CustomerCatalougeCode %>" FieldName="CustomerCatalougeCode"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:clientAddWo.CustomerWorkOrderNumber %>" FieldName="CustomerWorkOrderNumber"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:InventoryGrid.ContrCatalogueCodeColumn %>" FieldName="ContractorCatalogueCode"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:clientAddWo.ContractorWorkOrderNumber %>" FieldName="ContractorWorkOrderNumber"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:InventoryGrid.QuantityColumn %>" FieldName="Quantity"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:InventoryGrid.ProductDescriptionColumn %>" FieldName="ProductDescription"  ></dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:InventoryGrid.SendDateColumn %>" FieldName="SendDate" ></dx:GridViewDataDateColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:ClienteditWoForm.RequestedDelivaryDate %>" FieldName="RequestedDelivaryDate" ></dx:GridViewDataDateColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:ClienteditWoForm.PlannedDelivaryDate %>" FieldName="PlannedDelivaryDate" ></dx:GridViewDataDateColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:ClienteditWoForm.ActualDelivaryDate %>" FieldName="ActualDelivaryDate" ></dx:GridViewDataDateColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:InventoryGrid.DateBColumn %>" FieldName="DateFieldB" ></dx:GridViewDataDateColumn>
                <dx:GridViewDataDateColumn Caption="<%$ Dict:InventoryGrid.DateAColumn %>" FieldName="DateFieldA" ></dx:GridViewDataDateColumn>
                
            </Columns>
            </dx:ASPxGridView>
            <asp:SqlDataSource ID="MaterialInQCDataSource" runat="server" SelectCommandType="StoredProcedure"
                ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" SelectCommand="SCCover_MaterialInQCReport"></asp:SqlDataSource> 
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
